<html>

<head>
<title>HOSPITAL</title>
<link type="text/css" href="jquery-ui-1.8.13.custom/css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="Stylesheet" />	
<script type="text/javascript" src="jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.13.custom/js/jquery-ui-1.8.13.custom.min.js"></script>
</head>
<body>
<script language="javascript">
function fncSubmit()
{
if(document.form1.med_id.value == "")
	{
	alert('Please input Drug MED Id');
		document.form1.med_id.focus();
		return false;
	}
if(document.form1.pa_id.value == "")
	{
		alert('Please input Patients ID');
		document.form1.pa_id.focus();
		return false;
	}	  	
	document.form1.submit();
}

</script>
<br/>
<br/>
<center><h1>ADD MEDICATIONS</h1></center>
<br/>
<center><table border=3 bordercolor="#ff99cc">
<tr><td>
<form id="form1" name="form1" method="post" action="add-medications.php" onSubmit="JavaScript:return fncSubmit();">
	MEDICATION ID: <input name="med_id" type="text" id="a" /><br/>
	PATIENTS ID: <input name="pa_id" type="text" id="b"  /><br/>
	<center><input type="submit"  /></center>
</form>
</td></tr>
</table>

    
    <script>
function check() {
 obj = document.form1
 if(obj.a.value != "" && obj.b.value != "") {
  obj.Submit.disabled = false
 }
}
</script>


</body>
</html>